package com.sxt.springsecuritytest2.bean;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;

import java.io.Serializable;

 /*
 *
 * @Description todo
 * @author qqg
 * @date $date$
 * @param $params$ 
 * @return $return$
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysRole implements Serializable , GrantedAuthority {
    /**
    * 编号
    */
    private Integer id;

    /**
    * 角色名称
    */
    private String roleName;

    /**
    * 角色描述
    */
    private String roleDesc;

    private static final long serialVersionUID = 1L;

    @JsonIgnore
     @Override
     public String getAuthority() {
         return roleName;
     }
 }